package work.chenbo.mybatis.customize.session.impl;

import work.chenbo.mybatis.customize.config.Configuration;
import work.chenbo.mybatis.customize.session.SqlSession;
import work.chenbo.mybatis.customize.session.SqlSessionFactory;

/**
 * @author ChenBo
 * @className DefauiltSqlSessionFactory
 * @date 2020/12/23
 */
public class DefaultSqlSessionFactory implements SqlSessionFactory {

    private Configuration configuration;


    public DefaultSqlSessionFactory (Configuration configuration){
        this.configuration = configuration;
    }

    @Override
    public SqlSession openSession() {
        return new DefaultSqlSession(configuration);
    }
}
